package com.tchhy.provider.data.healthy.request

import com.tchhy.basemodule.basedata.Topic
import com.tchhy.provider.data.healthy.response.SearchTagRes
import java.io.Serializable

data class ContentBaseEntity(
    val title: String,
    val content: String,
    val topics: List<Topic>?,
    val images: List<String>,
    val videoUrl: String?,
    /**
     * 1表示图文，2表示视频
     */
    val type: Int,
    val lat: String?,
    val lng: String?,
    val width: Int,
    val height: Int,
    val areaId: String?,
    val author: String?,
    val authorId: String?,
    val authorImgUrl: String?,
    val checkTime: String?,
    val checkUser: String?,
    var isCollect: Boolean?,
    var isGreat: Boolean?,
    var collectCount: Int? = 0,
    val createTime: String?,
    val failureReason: String?,
    var greatCount: Int? = 0,
    val heatOrder: Int? = 0,
    val id: String?,
    val readCount: Int? = 0,
    var shareCount: Int? = 0,
    val shelfReason: List<ShelfReasonBean>?,
    val shelfStatus: Int?,
    val status: Int?,
    val ad: AdBean?,
    val adStatus: Int?,
    var length: Int,
    var distance: Double?,
    val level:Int?,
    /**
     * 标识itemView的版式，0代表竖版，1代表横板, 2代表提示标题 不是由后台返回，android自己定义
     */
    var viewType: Int = 0
) : Serializable {

    /**
     * 只是为了扩展itemType
     * @param viewType 标识item的类型
     */
    constructor(viewType: Int) : this(
        "",
        "",
        arrayListOf<Topic>(),
        arrayListOf<String>(),
        null,
        -1,
        null,
        null,
        -1,
        -1,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        -1,
        null,
        null,
        viewType
    )

    data class AdBean(
        val commodityId: String,
        val image: ImageBean,
        val manufacturer: String,
        val salesName: String
    ) : Serializable {

        data class ImageBean(
            val length: Int,
            val name: String,
            val url: String
        ) : Serializable
    }


    data class ShelfReasonBean(
        val checkUser: String,
        val checkUserId: String,
        val date: String,
        val description: String,
        val reason: String
    ) : Serializable

}